package com.mtons.mblog.modules.repository;

import com.mtons.mblog.modules.entity.LearnDoc;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author leicongwu
 */
public interface LearnDocRepository extends JpaRepository<LearnDoc, String>, JpaSpecificationExecutor<LearnDoc> {

    @Query(value = "select * from learn_doc where status=?1", nativeQuery = true)
    List<LearnDoc> queryAllByStatus(String status);
}
